#ifndef __MYSQL_H__
#define __MYSQL_H__

#include <stdio.h>
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>

typedef struct
{
    int id;
    char name[64];
    char sex[16];
    int score;
}dataStruct;

sqlite3* mysql_open(const char* dbName);
int mysql_create(sqlite3* db, const char* tableName);
int mysql_insert(sqlite3* db, const char* tableName, dataStruct data);
int mysql_delete_name(sqlite3* db, const char* tableName, const char* name);
int mysql_update(sqlite3* db, const char* tableName, const char* name, int score);
dataStruct mysql_find(sqlite3* db, const char* tableName, const char* name);
int mysql_show(sqlite3* db, const char* tableName);
void mysql_close(sqlite3* db);

#endif